up: programming - algorithms - graph drawing next: programming - algorithms - graph drawing drawing a scale
programming - algorithms - graph drawing calculating the scaling factorsWhat links here?
procedure calc_m_b(x_data_1, x_data_2, x_plot_1, x_plot_2: real; var m, b: real);
    m := (x_plot_2 - x_plot_1) / (x_data_2 - x_data_1);
    b := (x_data_1 * x_plot_2 - x_data_2 * x_plot_1) / (x_data_1 - x_data_2);
where:
x_data_1 and x_data_2 are the start and end of the data range
x_plot_1 and x_plot_2 are the corresponding start and end on the plot
m and b are the slope and intercept of the resulting conversion line

The results are used thus:
x_plot = x_data * m + b
where x_plot is the plot value and xd is the data value
programming - algorithms - graph drawing calculating the scaling factors
filename:programming - algorithms - graph drawing calculating the scaling factors
filename:programming%20%2D%20algorithms%20%2D%20graph%20drawing%20calculating%20the%20scaling%20factors
last edit:October 30 2015 17:24:05 (3110 days ago)
ct = 1714952196.000000 = May 05 2024 19:36:36
ft = 1446240245.000000 = October 30 2015 17:24:05
dt = 268711951.000000